home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-16 | 51.8 KB | 1,267 lines | [TEXT/CCL2] |
-
- (in-package :traps) ;
- ; Created: Tuesday, January 15, 1991 at 8:56 AM
- ; Script.p
- ; Pascal Interface to the Macintosh Libraries
- ;
- ; Copyright Apple Computer, Inc. 1986-1990
- ; All rights reserved
- ;
-
- ;;;;;;;;;;;;;
- ;
- ; Modification History
- ;
- ; 04/28/93 mwp Release
- ; 04/29/92 bill Typo in #_getdeffontsize
- ; ------------- 2.0
- ; 10/31/91 bill Bring back some not-in-rom traps.
- ; 08/29/91 bill get rid of :invalid-type
- ; 08/23/91 bill A few traps did not preserve argument evaluation order.
- ; _FormatX2Str had an :unknown-type. Change it to :ptr
- ;
-
- ; $IFC UNDEFINED UsingIncludes
- ; $SETC UsingIncludes := 0
- ; $ENDC
-
- ; $IFC NOT UsingIncludes
-
- ; $ENDC
-
- ; $IFC UNDEFINED UsingScript
- ; $SETC UsingScript := 1
-
- ; $I+
- ; $SETC ScriptIncludes := UsingIncludes
- ; $SETC UsingIncludes := 1
- ; $IFC UNDEFINED UsingTypes
-
- (require-interface 'TYPES) ; $I $$Shell(PInterfaces)Types.p
- ; $ENDC
- ; $IFC UNDEFINED UsingOSUtils
-
- (require-interface 'OSUTILS) ; $I $$Shell(PInterfaces)OSUtils.p
- ; $ENDC
- ; $IFC UNDEFINED UsingQuickdraw
-
- (require-interface 'QUICKDRAW) ; $I $$Shell(PInterfaces)Quickdraw.p
- ; $ENDC
- ; $SETC UsingIncludes := ScriptIncludes
-
- ; Script System constants
- (defconstant $smSystemScript -1); designates system script.
- (defconstant $smCurrentScript -2); designates current font script.
-
- (defconstant $smRoman 0) ; Roman
- (defconstant $smJapanese 1) ; Japanese
- (defconstant $smTradChinese 2) ; Traditional Chinese
- (defconstant $smKorean 3) ; Korean
- (defconstant $smArabic 4) ; Arabic
- (defconstant $smHebrew 5) ; Hebrew
- (defconstant $smGreek 6) ; Greek
- (defconstant $smCyrillic 7) ; Cyrillic
- (defconstant $smRSymbol 8) ; Right-left symbol
- (defconstant $smDevanagari 9) ; Devanagari
- (defconstant $smGurmukhi 10) ; Gurmukhi
- (defconstant $smGujarati 11) ; Gujarati
- (defconstant $smOriya 12) ; Oriya
- (defconstant $smBengali 13) ; Bengali
- (defconstant $smTamil 14) ; Tamil
- (defconstant $smTelugu 15) ; Telugu
- (defconstant $smKannada 16) ; Kannada/Kanarese
- (defconstant $smMalayalam 17) ; Malayalam
- (defconstant $smSinhalese 18) ; Sinhalese
- (defconstant $smBurmese 19) ; Burmese
- (defconstant $smKhmer 20) ; Khmer/Cambodian
- (defconstant $smThai 21) ; Thai
- (defconstant $smLaotian 22) ; Laotian
- (defconstant $smGeorgian 23) ; Georgian
- (defconstant $smArmenian 24) ; Armenian
- (defconstant $smSimpChinese 25) ; Simplified Chinese
- (defconstant $smTibetan 26) ; Tibetan
- (defconstant $smMongolian 27) ; Mongolian
- (defconstant $smGeez 28) ; Geez/Ethiopic
- (defconstant $smEthiopic 28) ; Synonym for smGeez
- (defconstant $smEastEurRoman 29); Synonym for smSlavic
- (defconstant $smVietnamese 30) ; Vietnamese
- (defconstant $smExtArabic 31) ; extended Arabic
- (defconstant $smUninterp 32) ; uninterpreted symbols, e.g. palette symbols
-
- ; Obsolete names for script systems (kept for backward compatibility)
- (defconstant $smChinese 2) ; (use smTradChinese or smSimpChinese)
- (defconstant $smRussian 7) ; (old name for smCyrillic)
-
- ; smMaldivian = 25; (no more smMaldivian!)
- (defconstant $smAmharic 28) ; (old name for smGeez)
- (defconstant $smSlavic 29) ; (old name for smEastEurRoman)
- (defconstant $smSindhi 31) ; (old name for smExtArabic)
-
- ; Calendar Codes
- (defconstant $calGregorian 0)
- (defconstant $calArabicCivil 1)
- (defconstant $calArabicLunar 2)
- (defconstant $calJapanese 3)
- (defconstant $calJewish 4)
- (defconstant $calCoptic 5)
- (defconstant $calPersian 6)
-
- ; Integer Format Codes
- (defconstant $intWestern 0)
- (defconstant $intArabic 1)
- (defconstant $intRoman 2)
- (defconstant $intJapanese 3)
- (defconstant $intEuropean 4)
- (defconstant $intOutputMask #x8000)
-
- ; CharByte byte types
- (defconstant $smSingleByte 0)
- (defconstant $smFirstByte -1)
- (defconstant $smLastByte 1)
- (defconstant $smMiddleByte 2)
-
- ; CharType field masks
- (defconstant $smcTypeMask #xf)
- (defconstant $smcReserved #xf0)
- (defconstant $smcClassMask #xf00)
- (defconstant $smcOrientationMask #x1000); two-byte script glyph orientation
- (defconstant $smcRightMask #x2000)
- (defconstant $smcUpperMask #x4000)
- (defconstant $smcDoubleMask #x8000)
-
- ; Basic CharType character types
- (defconstant $smCharPunct #x0)
- (defconstant $smCharAscii #x1)
- (defconstant $smCharEuro #x7)
- (defconstant $smCharExtAscii #x7); More correct synonym for smCharEuro
-
- ; Additional CharType character types for script systems
- (defconstant $smCharKatakana #x2); Japanese Katakana
- (defconstant $smCharHiragana #x3); Japanese Hiragana
- (defconstant $smCharIdeographic #x4); Hanzi, Kanji, Hanja
- (defconstant $smCharTwoByteGreek #x5); 2-byte Greek in Far East systems
- (defconstant $smCharTwoByteRussian #x6); 2-byte Cyrillic in Far East systems
- (defconstant $smCharBidirect #x8); Arabic/Hebrew
- (defconstant $smCharHangul #xc) ; Korean Hangul
- (defconstant $smCharJamo #xd) ; Korean Jamo
-
- ; old names for above, for backward compatibility
- (defconstant $smCharFISKana #x2); Katakana
- (defconstant $smCharFISGana #x3); Hiragana
- (defconstant $smCharFISIdeo #x4); Hanzi, Kanji, Hanja
- (defconstant $smCharFISGreek #x5); 2-byte Greek in Far East systems
- (defconstant $smCharFISRussian #x6); 2-byte Cyrillic in Far East systems
-
- ; CharType classes for punctuation (smCharPunct)
- (defconstant $smPunctNormal #x0)
- (defconstant $smPunctNumber #x100)
- (defconstant $smPunctSymbol #x200)
- (defconstant $smPunctBlank #x300)
- (defconstant $smPunctRepeat #x400); FIS: wildcard
- (defconstant $smPunctGraphic #x500); FIS: line graphics
-
- ; CharType classes for FISKana, FISGana
- (defconstant $smKanaSmall #x100); small kana character
- (defconstant $smKanaHardOK #x200); can have dakuten
- (defconstant $smKanaSoftOK #x300); can have dakuten or han-dakuten
-
- ; CharType Ideographics classes for two-byte systems
- (defconstant $smIdeographicLevel1 #x0); level 1 char
- (defconstant $smIdeographicLevel2 #x100); level 2 char
- (defconstant $smIdeographicUser #x200); user char
-
- ; old names for above, for backward compatibility
- (defconstant $smFISClassLvl1 #x0); level 1 char
- (defconstant $smFISClassLvl2 #x100); level 2 char
- (defconstant $smFISClassUser #x200); user char
-
- ; CharType Jamo classes for Korean systems
- (defconstant $smJamoJaeum #x0) ; simple consonant char
- (defconstant $smJamoBogJaeum #x100); complex consonant char
- (defconstant $smJamoMoeum #x200); simple vowel char
- (defconstant $smJamoBogMoeum #x300); complex vowel char
-
- ; CharType FIS glyph orientation
- (defconstant $smCharHorizontal #x0); horizontal character form, or for both
- (defconstant $smCharVertical #x1000); vertical character form
-
- ; CharType directions
- (defconstant $smCharLeft #x0)
- (defconstant $smCharRight #x2000)
-
- ; CharType case modifers
- (defconstant $smCharLower #x0)
- (defconstant $smCharUpper #x4000)
-
- ; CharType character size modifiers (1 or multiple bytes).
- (defconstant $smChar1byte #x0)
- (defconstant $smChar2byte #x8000)
-
- ; Char2Pixel directions
- (defconstant $smLeftCaret 0) ; Place caret for left block
- (defconstant $smRightCaret -1) ; Place caret for right block
- (defconstant $smHilite 1) ; Direction is TESysJust
-
- ; Transliterate target types for Roman
- (defconstant $smTransAscii 0)
- (defconstant $smTransNative 1)
- (defconstant $smTransCase #xfe)
- (defconstant $smTransSystem #xff); convert to system script
-
- ; Transliterate target types for FIS
- (defconstant $smTransAscii1 2) ; 1-byte Roman
- (defconstant $smTransAscii2 3) ; 2-byte Roman
- (defconstant $smTransKana1 4) ; 1-byte Japanese Katakana
- (defconstant $smTransKana2 5) ; 2-byte Japanese Katakana
- (defconstant $smTransGana2 7) ; 2-byte Japanese Hiragana (no 1-byte Hiragana)
- (defconstant $smTransHangul2 8) ; 2-byte Korean Hangul
- (defconstant $smTransJamo2 9) ; 2-byte Korean Jamo
- (defconstant $smTransBopomofo2 10); 2-byte Chinese Bopomofo
-
- ; Transliterate target modifiers
- (defconstant $smTransLower #x4000)
- (defconstant $smTransUpper #x8000)
-
- ; Transliterate source mask - general
- (defconstant $smMaskAll #xffffffff); Convert all text
-
- ; Transliterate source masks
- (defconstant $smMaskAscii #x1) ; 2^smTransAscii
- (defconstant $smMaskNative #x2) ; 2^smTransNative
-
- ; Transliterate source masks for FIS
- (defconstant $smMaskAscii1 #x4) ; 2^smTransAscii1
- (defconstant $smMaskAscii2 #x8) ; 2^smTransAscii2
- (defconstant $smMaskKana1 #x10) ; 2^smTransKana1
- (defconstant $smMaskKana2 #x20) ; 2^smTransKana2
- (defconstant $smMaskGana2 #x80) ; 2^smTransGana2
- (defconstant $smMaskHangul2 #x100); 2^smTransHangul2
- (defconstant $smMaskJamo2 #x200); 2^smTransJamo2
- (defconstant $smMaskBopomofo2 #x400); 2^smTransBopomofo2
-
- ; Result values from GetEnvirons, SetEnvirons, GetScript and SetScript calls.
- (defconstant $smNotInstalled 0) ; routine not available in script
- (defconstant $smBadVerb -1) ; Bad verb passed to a routine
- (defconstant $smBadScript -2) ; Bad script code passed to a routine
-
- ; Values for script redraw flag.
- (defconstant $smRedrawChar 0) ; Redraw character only
- (defconstant $smRedrawWord 1) ; Redraw entire word (2-byte systems)
- (defconstant $smRedrawLine -1) ; Redraw entire line (bidirectional systems)
-
- ; GetEnvirons and SetEnvirons verbs
- (defconstant $smVersion 0) ; Environment version number
- (defconstant $smMunged 2) ; Globals change count
- (defconstant $smEnabled 4) ; Environment enabled flag
- (defconstant $smBidirect 6) ; At least on bidirect script
- (defconstant $smFontForce 8) ; Force font flag
- (defconstant $smIntlForce 10) ; Force intl flag
- (defconstant $smForced 12) ; script forced to system script
- (defconstant $smDefault 14) ; script defaulted to Roman script
- (defconstant $smPrint 16) ; Printer action routine
- (defconstant $smSysScript 18) ; System script
- (defconstant $smLastScript 20) ; Last keyboard script
- (defconstant $smKeyScript 22) ; Keyboard script
- (defconstant $smSysRef 24) ; System folder refNum
- (defconstant $smKeyCache 26) ; Keyboard table cache pointer
- (defconstant $smKeySwap 28) ; Swapping table pointer
- (defconstant $smGenFlags 30) ; General flags long
- (defconstant $smOverride 32) ; Script override flags
- (defconstant $smCharPortion 34) ; Ch vs SpExtra proportion
-
- ; New for System 7.0:
- (defconstant $smDoubleByte 36) ; Flag for double-byte script installed
- (defconstant $smKCHRCache 38) ; Returns pointer to KCHR cache
- (defconstant $smRegionCode 40) ; Returns current region code (verXxx)
-
- ; GetScript and SetScript verbs.
- ; Note: Verbs private to script systems are negative, while
- ; those general across script systems are non-negative.
- (defconstant $smScriptVersion 0); Script software version
- (defconstant $smScriptMunged 2) ; Script entry changed count
- (defconstant $smScriptEnabled 4); Script enabled flag
- (defconstant $smScriptRight 6) ; Right to left flag
- (defconstant $smScriptJust 8) ; Justification flag
- (defconstant $smScriptRedraw 10); Word redraw flag
- (defconstant $smScriptSysFond 12); Preferred system font
- (defconstant $smScriptAppFond 14); Preferred Application font
- (defconstant $smScriptBundle 16); Beginning of itlb verbs
- (defconstant $smScriptNumber 16); Script itl0 id
- (defconstant $smScriptDate 18) ; Script itl1 id
- (defconstant $smScriptSort 20) ; Script itl2 id
- (defconstant $smScriptFlags 22) ; flags word
- (defconstant $smScriptToken 24) ; Script itl4 id
- (defconstant $smScriptEncoding 26); id of optional itl5, if present
- (defconstant $smScriptLang 28) ; Current language for script
- (defconstant $smScriptNumDate 30); Script KCHR id
- (defconstant $smScriptKeys 32) ; Script KEYC id from dictionary
- (defconstant $smScriptIcon 34) ; ID # of SICN or kcs#/kcs4/kcs8 suite
- (defconstant $smScriptPrint 36) ; Script printer action routine
- (defconstant $smScriptTrap 38) ; Trap entry pointer
- (defconstant $smScriptCreator 40); Script file creator
- (defconstant $smScriptFile 42) ; Script file name
- (defconstant $smScriptName 44) ; Script name
-
- ; There is a hole here for old Kanji private verbs 46-76
- ;
- ; New for System 7.0:
- (defconstant $smScriptMonoFondSize 78); default monospace FOND (hi) & size (lo)
- (defconstant $smScriptPrefFondSize 80); preferred FOND (hi) & size (lo)
- (defconstant $smScriptSmallFondSize 82); default small FOND (hi) & size (lo)
- (defconstant $smScriptSysFondSize 84); default system FOND (hi) & size (lo)
- (defconstant $smScriptAppFondSize 86); default app FOND (hi) & size (lo)
- (defconstant $smScriptHelpFondSize 88); default Help Mgr FOND (hi) & size (lo)
- (defconstant $smScriptValidStyles 90); mask of valid styles for script
- (defconstant $smScriptAliasStyle 92); style (set) to use for aliases
-
- ; Negative verbs for KeyScript
- (defconstant $smKeyNextScript -1); Switch to next available script
- (defconstant $smKeySysScript -2); Switch to the system script
- (defconstant $smKeySwapScript -3); Switch to previously-used script
-
- ; New for System 7.0:
- (defconstant $smKeyNextKybd -4) ; Switch to next keyboard in current script
- (defconstant $smKeySwapKybd -5) ; Switch to previously-used keyboard in current keyscript
-
- (defconstant $smKeyDisableKybds -6); Disable keyboards not in system or Roman script
- (defconstant $smKeyEnableKybds -7); Re-enable keyboards for all enabled scripts
- (defconstant $smKeyToggleInline -8); Toggle inline input for current keyscript
- (defconstant $smKeyToggleDirection -9); Toggle default line direction (TESysJust)
- (defconstant $smKeyNextInputMethod -10); Switch to next input method in current keyscript
- (defconstant $smKeySwapInputMethod -11); Switch to last-used input method in current keyscript
-
- (defconstant $smKeyDisableKybdSwitch -12); Disable switching from the current keyboard
-
- ; Bits in the smScriptFlags word
- ; (bits above 7 are non-static)
- (defconstant $smsfIntellCP 0) ; script has intellegent cut & paste
- (defconstant $smsfSingByte 1) ; script has only single bytes
- (defconstant $smsfNatCase 2) ; native chars have upper & lower case
- (defconstant $smsfContext 3) ; contextual script (e.g. AIS-based)
- (defconstant $smsfNoForceFont 4); Will not force characters
- (defconstant $smsfB0Digits 5) ; Has alternate digits at B0-B9
- (defconstant $smsfAutoInit 6) ; auto initialize the script
- (defconstant $smsfForms 13) ; Uses contextual forms for letters
- (defconstant $smsfLigatures 14) ; Uses contextual ligatures
- (defconstant $smsfReverse 15) ; Reverses native text, right-left
-
- ; Bits in the smGenFlags long.
- ; First (high-order) byte is set from itlc flags byte.
- (defconstant $smfShowIcon 31) ; Show icon even if only one script
- (defconstant $smfDualCaret 30) ; Use dual caret for mixed direction text
- (defconstant $smfNameTagEnab 29); Reserved for internal use
-
- ; Roman script constants
- ;
- ; The following are here for backward compatibility, but should not be used.
- ; This information should be obtained using GetScript.
- (defconstant $romanSysFond #x3fff); system font id number
- (defconstant $romanAppFond 3) ; application font id number
- (defconstant $romanFlags #x7) ; roman settings
-
- ; Script Manager font equates.
- (defconstant $smFondStart #x4000); start from 16K
- (defconstant $smFondEnd #xc000) ; past end of range at 48K
-
- ; Miscellaneous font equates.
- (defconstant $smUprHalfCharSet #x80); first char code in top half of std char set
-
- ; Character Set Extensions
- (defconstant $diaeresisUprY #xd9)
- (defconstant $fraction #xda)
- (defconstant $intlCurrency #xdb)
- (defconstant $leftSingGuillemet #xdc)
- (defconstant $rightSingGuillemet #xdd)
- (defconstant $fiLigature #xde)
- (defconstant $flLigature #xdf)
- (defconstant $dblDagger #xe0)
- (defconstant $centeredDot #xe1)
- (defconstant $baseSingQuote #xe2)
- (defconstant $baseDblQuote #xe3)
- (defconstant $perThousand #xe4)
- (defconstant $circumflexUprA #xe5)
- (defconstant $circumflexUprE #xe6)
- (defconstant $acuteUprA #xe7)
- (defconstant $diaeresisUprE #xe8)
- (defconstant $graveUprE #xe9)
- (defconstant $acuteUprI #xea)
- (defconstant $circumflexUprI #xeb)
- (defconstant $diaeresisUprI #xec)
- (defconstant $graveUprI #xed)
- (defconstant $acuteUprO #xee)
- (defconstant $circumflexUprO #xef)
- (defconstant $appleLogo #xf0)
- (defconstant $graveUprO #xf1)
- (defconstant $acuteUprU #xf2)
- (defconstant $circumflexUprU #xf3)
- (defconstant $graveUprU #xf4)
- (defconstant $dotlessLwrI #xf5)
- (defconstant $circumflex #xf6)
- (defconstant $tilde #xf7)
- (defconstant $macron #xf8)
- (defconstant $breveMark #xf9)
- (defconstant $overDot #xfa)
- (defconstant $ringMark #xfb)
- (defconstant $cedilla #xfc)
- (defconstant $doubleAcute #xfd)
- (defconstant $ogonek #xfe)
- (defconstant $hachek #xff)
-
- ; String2Date status values
- (defconstant $fatalDateTime #x8000)
- (defconstant $longDateFound 1)
- (defconstant $leftOverChars 2)
- (defconstant $sepNotIntlSep 4)
- (defconstant $fieldOrderNotIntl 8)
- (defconstant $extraneousStrings 16)
- (defconstant $tooManySeps 32)
- (defconstant $sepNotConsistent 64)
- (defconstant $tokenErr #x8100)
- (defconstant $cantReadUtilities #x8200)
- (defconstant $dateTimeNotFound #x8400)
- (defconstant $dateTimeInvalid #x8800)
-
- ; TokenType values
- (defconstant $tokenIntl 4) ; the itl resource number of the tokenizer
- (defconstant $tokenEmpty -1)
- (defconstant $tokenUnknown 0)
- (defconstant $tokenWhite 1)
- (defconstant $tokenLeftLit 2)
- (defconstant $tokenRightLit 3)
- (defconstant $tokenAlpha 4)
- (defconstant $tokenNumeric 5)
- (defconstant $tokenNewLine 6)
- (defconstant $tokenLeftComment 7)
- (defconstant $tokenRightComment 8)
- (defconstant $tokenLiteral 9)
- (defconstant $tokenEscape 10)
- (defconstant $tokenAltNum 11)
- (defconstant $tokenRealNum 12)
- (defconstant $tokenAltReal 13)
- (defconstant $tokenReserve1 14)
- (defconstant $tokenReserve2 15)
- (defconstant $tokenLeftParen 16)
- (defconstant $tokenRightParen 17)
- (defconstant $tokenLeftBracket 18)
- (defconstant $tokenRightBracket 19)
- (defconstant $tokenLeftCurly 20)
- (defconstant $tokenRightCurly 21)
- (defconstant $tokenLeftEnclose 22)
- (defconstant $tokenRightEnclose 23)
- (defconstant $tokenPlus 24)
- (defconstant $tokenMinus 25)
- (defconstant $tokenAsterisk 26)
- (defconstant $tokenDivide 27)
- (defconstant $tokenPlusMinus 28)
- (defconstant $tokenSlash 29)
- (defconstant $tokenBackSlash 30)
- (defconstant $tokenLess 31)
- (defconstant $tokenGreat 32)
- (defconstant $tokenEqual 33)
- (defconstant $tokenLessEqual2 34)
- (defconstant $tokenLessEqual1 35)
- (defconstant $tokenGreatEqual2 36)
- (defconstant $tokenGreatEqual1 37)
- (defconstant $token2Equal 38)
- (defconstant $tokenColonEqual 39)
- (defconstant $tokenNotEqual 40)
- (defconstant $tokenLessGreat 41)
- (defconstant $tokenExclamEqual 42)
- (defconstant $tokenExclam 43)
- (defconstant $tokenTilde 44)
- (defconstant $tokenComma 45)
- (defconstant $tokenPeriod 46)
- (defconstant $tokenLeft2Quote 47)
- (defconstant $tokenRight2Quote 48)
- (defconstant $tokenLeft1Quote 49)
- (defconstant $tokenRight1Quote 50)
- (defconstant $token2Quote 51)
- (defconstant $token1Quote 52)
- (defconstant $tokenSemicolon 53)
- (defconstant $tokenPercent 54)
- (defconstant $tokenCaret 55)
- (defconstant $tokenUnderline 56)
- (defconstant $tokenAmpersand 57)
- (defconstant $tokenAtSign 58)
- (defconstant $tokenBar 59)
- (defconstant $tokenQuestion 60)
- (defconstant $tokenPi 61)
- (defconstant $tokenRoot 62)
- (defconstant $tokenSigma 63)
- (defconstant $tokenIntegral 64)
- (defconstant $tokenMicro 65)
- (defconstant $tokenCapPi 66)
- (defconstant $tokenInfinity 67)
- (defconstant $tokenColon 68)
- (defconstant $tokenHash 69)
- (defconstant $tokenDollar 70)
- (defconstant $tokenNoBreakSpace 71)
- (defconstant $tokenFraction 72)
- (defconstant $tokenIntlCurrency 73)
- (defconstant $tokenLeftSingGuillemet 74)
- (defconstant $tokenRightSingGuillemet 75)
- (defconstant $tokenPerThousand 76)
- (defconstant $tokenEllipsis 77)
- (defconstant $tokenCenterDot 78)
- (defconstant $tokenNil 127)
- (defconstant $delimPad -2)
-
- ; obsolete, misspelled token names kept for backward compatibility
- (defconstant $tokenTilda 44)
- (defconstant $tokenCarat 55)
-
- ; the NumberParts indices
- (defconstant $tokLeftQuote 1)
- (defconstant $tokRightQuote 2)
- (defconstant $tokLeadPlacer 3)
- (defconstant $tokLeader 4)
- (defconstant $tokNonLeader 5)
- (defconstant $tokZeroLead 6)
- (defconstant $tokPercent 7)
- (defconstant $tokPlusSign 8)
- (defconstant $tokMinusSign 9)
- (defconstant $tokThousands 10)
- (defconstant $tokSeparator 12) ; 11 is a reserved field
- (defconstant $tokEscape 13)
- (defconstant $tokDecPoint 14)
- (defconstant $tokEPlus 15)
- (defconstant $tokEMinus 16)
- (defconstant $tokMaxSymbols 31)
- (defconstant $curNumberPartsVersion 1); current version of NumberParts record
- (defconstant $fVNumber 0) ; first version of NumFormatString
-
- ; Date equates
- (defconstant $smallDateBit 31) ; Restrict valid date/time to range of Time global
- (defconstant $togChar12HourBit 30); If toggling hour by char, accept hours 1..12 only
- (defconstant $togCharZCycleBit 29); Modifier for togChar12HourBit: accept hours 0..11 only
- (defconstant $togDelta12HourBit 28); If toggling hour up/down, restrict to 12-hour range (am/pm)
- (defconstant $genCdevRangeBit 27); Restrict date/time to range used by genl CDEV
- (defconstant $validDateFields -1)
- (defconstant $maxDateField 10)
- (defconstant $eraMask #x1)
- (defconstant $yearMask #x2)
- (defconstant $monthMask #x4)
- (defconstant $dayMask #x8)
- (defconstant $hourMask #x10)
- (defconstant $minuteMask #x20)
- (defconstant $secondMask #x40)
- (defconstant $dayOfWeekMask #x80)
- (defconstant $dayOfYearMask #x100)
- (defconstant $weekOfYearMask #x200)
- (defconstant $pmMask #x400)
- (defconstant $dateStdMask #x7f)
-
- ; Toggle results
- (defconstant $toggleUndefined 0)
- (defconstant $toggleOK 1)
- (defconstant $toggleBadField 2)
- (defconstant $toggleBadDelta 3)
- (defconstant $toggleBadChar 4)
- (defconstant $toggleUnknown 5)
- (defconstant $toggleBadNum 6)
- (defconstant $toggleOutOfRange 7); synonym for toggleErr3
- (defconstant $toggleErr3 7)
- (defconstant $toggleErr4 8)
- (defconstant $toggleErr5 9)
-
- ; Constants for truncWhere argument in TruncString and TruncText
- (defconstant $smTruncEnd 0) ; Truncate at end
- (defconstant $smTruncMiddle #x4000); Truncate in middle
-
- ; Constants for TruncString and TruncText results
- (defconstant $smNotTruncated 0) ; No truncation was necessary
- (defconstant $smTruncated 1) ; Truncation performed
- (defconstant $smTruncErr -1) ; General error
-
- ; Constants for styleRunPosition argument in NPortionText, NDrawJust,
- ; NMeasureJust, NChar2Pixel, and NPixel2Char.
- (defconstant $smOnlyStyleRun 0) ; This is the only style run on the line
- (defconstant $smLeftStyleRun 1) ; This is leftmost of multiple style runs on the line
- (defconstant $smRightStyleRun 2); This is rightmost of multiple style runs on the line
- (defconstant $smMiddleStyleRun 3); There are multiple style runs on the line and this
- ; is neither the leftmost nor the rightmost.
-
- (def-mactype :tokenresults (find-mactype :unsigned-byte))
- (defconstant $tokenOK 0)
- (defconstant $tokenOverflow 1)
- (defconstant $stringOverflow 2)
- (defconstant $badDelim 3)
- (defconstant $badEnding 4)
- (defconstant $crash 5)
-
- (def-mactype :longdatefield (find-mactype :unsigned-word))
- (defconstant $eraField 0)
- (defconstant $yearField 1)
- (defconstant $monthField 2)
- (defconstant $dayField 3)
- (defconstant $hourField 4)
- (defconstant $minuteField 5)
- (defconstant $secondField 6)
- (defconstant $dayOfWeekField 7)
- (defconstant $dayOfYearField 8)
- (defconstant $weekOfYearField 9)
- (defconstant $pmField 10)
- (defconstant $res1Field 11)
- (defconstant $res2Field 12)
- (defconstant $res3Field 13)
-
- (def-mactype :styledlinebreakcode (find-mactype :unsigned-byte))
- (defconstant $smBreakWord 0)
- (defconstant $smBreakChar 1)
- (defconstant $smBreakOverflow 2)
-
- (def-mactype :formatclass (find-mactype :unsigned-byte))
- (defconstant $fPositive 0)
- (defconstant $fNegative 1)
- (defconstant $fZero 2)
-
- (def-mactype :formatresulttype (find-mactype :unsigned-word))
- (defconstant $fFormatOK 0)
- (defconstant $fBestGuess 1)
- (defconstant $fOutOfSynch 2)
- (defconstant $fSpuriousChars 3)
- (defconstant $fMissingDelimiter 4)
- (defconstant $fExtraDecimal 5)
- (defconstant $fMissingLiteral 6)
- (defconstant $fExtraExp 7)
- (defconstant $fFormatOverflow 8)
- (defconstant $fFormStrIsNAN 9)
- (defconstant $fBadPartsTable 10)
- (defconstant $fExtraPercent 11)
- (defconstant $fExtraSeparator 12)
- (defconstant $fEmptyFormatString 13)
-
- (defrecord CharByteTable (array (array :signed-byte 256)))
- (def-mactype :toggleresults (find-mactype :signed-integer))
-
- (def-mactype :breaktableptr (find-mactype :pointer))
- (defrecord BreakTable
- (charTypes (:array :signed-byte 256))
- (tripleLength :signed-integer)
- (triples (:array :signed-integer 1))
- )
-
- ; New NBreakTable for System 7.0:
- (def-mactype :nbreaktableptr (find-mactype :pointer))
- (defrecord NBreakTable
- (flags1 :signed-byte)
- (flags2 :signed-byte)
- (version :signed-integer)
- (classTableOff :signed-integer)
- (auxCTableOff :signed-integer)
- (backwdTableOff :signed-integer)
- (forwdTableOff :signed-integer)
- (doBackup :signed-integer)
- (reserved :signed-integer)
- (charTypes (:array :signed-byte 256))
- (tables (:array :signed-integer 1))
- )
-
- (defrecord OffPair
- (offFirst :signed-integer)
- (offSecond :signed-integer)
- )
-
- (defrecord OffsetTable (array (array :offpair 3)))
-
- (defrecord ItlcRecord
- (itlcSystem :signed-integer) ; default system script
- (itlcReserved :signed-integer); reserved
- (itlcFontForce :signed-byte) ; default font force flag
- (itlcIntlForce :signed-byte) ; default intl force flag
- (itlcOldKybd :signed-byte) ; old keyboard
- (itlcFlags :signed-byte) ; general flags
- (itlcIconOffset :signed-integer); script icon offset
- (itlcIconSide :signed-byte) ; icon side
- (itlcIconRsvd :signed-byte) ; rsvd for other icon info
- (itlcRegionCode :signed-integer); preferred verXxx code
- (itlcReserved3 (:array :signed-byte 34)); for future use
- )
-
- (defrecord ItlbRecord
- (itlbNumber :signed-integer) ; itl0 id number
- (itlbDate :signed-integer) ; itl1 id number
- (itlbSort :signed-integer) ; itl2 id number
- (itlbFlags :signed-integer) ; Script flags
- (itlbToken :signed-integer) ; itl4 id number
- (itlbEncoding :signed-integer); itl5 ID # (optional; char encoding)
- (itlbLang :signed-integer) ; cur language for script
- (itlbNumRep :signed-byte) ; number representation code
- (itlbDateRep :signed-byte) ; date representation code
- (itlbKeys :signed-integer) ; KCHR id number
- (itlbIcon :signed-integer) ; ID # of SICN or kcs#/kcs4/kcs8 suite.
- )
-
- ; New ItlbExtRecord structure for System 7.0
- (DEFRECORD ITLBEXTRECORD (BASE :ITLBRECORD)
- (ITLBLOCALSIZE :SIGNED-LONG)
- (ITLBMONOFOND :SIGNED-INTEGER)
- (ITLBMONOSIZE :SIGNED-INTEGER)
- (ITLBPREFFOND :SIGNED-INTEGER)
- (ITLBPREFSIZE :SIGNED-INTEGER)
- (ITLBSMALLFOND :SIGNED-INTEGER)
- (ITLBSMALLSIZE :SIGNED-INTEGER)
- (ITLBSYSFOND :SIGNED-INTEGER)
- (ITLBSYSSIZE :SIGNED-INTEGER)
- (ITLBAPPFOND :SIGNED-INTEGER)
- (ITLBAPPSIZE :SIGNED-INTEGER)
- (ITLBHELPFOND :SIGNED-INTEGER)
- (ITLBHELPSIZE :SIGNED-INTEGER)
- (FILLER1 :SIGNED-BYTE)
- (ITLBVALIDSTYLES :UNSIGNED-BYTE)
- (FILLER2 :SIGNED-BYTE)
- (ITLBALIASSTYLE :UNSIGNED-BYTE))
-
- (defrecord MachineLocation
- (latitude :signed-long)
- (longitude :signed-long)
- (:variant
-
- ((dlsDelta :signed-byte)) ; signed byte; daylight savings delta
-
- ((gmtDelta :signed-long)) ; must mask - see documentation
- ))
-
- (def-mactype :string2datestatus (find-mactype :signed-integer))
- (def-mactype :tokentype (find-mactype :signed-integer))
- (defrecord DelimType (array (array :signed-integer 2)))
- (defrecord CommentType (array (array :signed-integer 4)))
-
- (def-mactype :tokenrecptr (find-mactype :pointer))
- (defrecord TokenRec
- (theToken :signed-integer)
- (position :pointer) ; pointer into original Source
- (length :signed-long) ; length of text in original source
- (stringPosition (:pointer (:string 255))); Pascal/C string copy of identifier
- )
-
- (def-mactype :tokenblockptr (find-mactype :pointer))
- (defrecord TokenBlock
- (source :pointer) ; pointer to stream of characters
- (sourceLength :signed-long) ; length of source stream
- (tokenList :pointer) ; pointer to array of tokens
- (tokenLength :signed-long) ; maximum length of TokenList
- (tokenCount :signed-long) ; number tokens generated by tokenizer
- (stringList :pointer) ; pointer to stream of identifiers
- (stringLength :signed-long) ; length of string list
- (stringCount :signed-long) ; number of bytes currently used
- (doString :boolean) ; make strings & put into StringLIst
- (doAppend :boolean) ; append to TokenList rather than replace
- (doAlphanumeric :boolean) ; identifiers may include numeric
- (doNest :boolean) ; do comments nest?
- (leftDelims (:array :signed-integer 2))
- (rightDelims (:array :signed-integer 2))
- (leftComment (:array :signed-integer 4))
- (rightComment (:array :signed-integer 4))
- (escapeCode :signed-integer) ; escape symbol code
- (decimalCode :signed-integer)
- (itlResource :handle) ; ptr to itl4 resource of current script
- (reserved (:array :signed-long 8)); must be zero!
- )
-
- (def-mactype :untokentableptr (find-mactype :pointer))
- (def-mactype :untokentablehandle (find-mactype :handle))
- (defrecord (UntokenTable :handle)
- (len :signed-integer)
- (lastToken :signed-integer)
- (index (:array :signed-integer 256)); index table; last = lastToken
- )
-
- (def-mactype :datecacheptr (find-mactype :pointer))
- (defrecord DateCacheRecord
- (hidden (:array :signed-integer 256)); only for temporary use
- )
-
- (defrecord longdatetime (data :comp))
-
- (defrecord LongDateCvt
- (:variant
-
- ((c :longdatetime))
-
- ((lHigh :signed-long)
- (lLow :signed-long))
- ))
-
- (defrecord LongDateRec
- (:variant
-
- ((era :signed-integer)
- (year :signed-integer)
- (month :signed-integer)
- (day :signed-integer)
- (hour :signed-integer)
- (minute :signed-integer)
- (second :signed-integer)
- (dayOfWeek :signed-integer)
- (dayOfYear :signed-integer)
- (weekOfYear :signed-integer)
- (pm :signed-integer)
- (res1 :signed-integer)
- (res2 :signed-integer)
- (res3 :signed-integer))
-
- ((list (:array :signed-integer 14))); Index by LongDateField!
-
- ((eraAlt :signed-integer)
- (oldDate :datetimerec))
- ))
-
- (def-mactype :datedelta (find-mactype :signed-byte))
-
- (defrecord TogglePB
- (togFlags :signed-long) ; caller normally sets low word to dateStdMask=$7F
- (amChars :ostype) ; from intl0
- (pmChars :ostype) ; from intl0
- (reserved (:array :signed-long 4))
- )
-
- (defrecord FormatOrder (array (array :signed-integer 1)))
- (def-mactype :formatorderptr (find-mactype :pointer))
- (def-mactype :formatstatus (find-mactype :signed-integer))
-
- (defrecord WideChar
- (:variant
-
- ((a (:array :character 2))); 0 is the high order character
-
- ((b :signed-integer))
- ))
-
- (defrecord WideCharArr
- (size :signed-integer)
- (data (:array :widechar 10))
- )
-
- (defrecord NumFormatString
- (fLength :unsigned-byte)
- (fVersion :unsigned-byte)
- (data (:array :signed-byte 254)); private data
- )
-
- (def-mactype :itl4ptr (find-mactype :pointer))
- (def-mactype :itl4handle (find-mactype :handle))
- (defrecord (Itl4Rec :handle)
- (flags :signed-integer)
- (resourceType :signed-long)
- (resourceNum :signed-integer)
- (version :signed-integer)
- (resHeader1 :signed-long)
- (resHeader2 :signed-long)
- (numTables :signed-integer) ; one-based
- (mapOffset :signed-long) ; offsets are from record start
- (strOffset :signed-long)
- (fetchOffset :signed-long)
- (unTokenOffset :signed-long)
- (defPartsOffset :signed-long)
- (resOffset6 :signed-long)
- (resOffset7 :signed-long)
- (resOffset8 :signed-long)
- )
-
- ; New NItl4Rec for System 7.0:
- (def-mactype :nitl4ptr (find-mactype :pointer))
- (def-mactype :nitl4handle (find-mactype :handle))
- (defrecord (NItl4Rec :handle)
- (flags :signed-integer)
- (resourceType :signed-long)
- (resourceNum :signed-integer)
- (version :signed-integer)
- (format :signed-integer)
- (resHeader :signed-integer)
- (resHeader2 :signed-long)
- (numTables :signed-integer) ; one-based
- (mapOffset :signed-long) ; offsets are from record start
- (strOffset :signed-long)
- (fetchOffset :signed-long)
- (unTokenOffset :signed-long)
- (defPartsOffset :signed-long)
- (whtSpListOffset :signed-long)
- (resOffset7 :signed-long)
- (resOffset8 :signed-long)
- (resLength1 :signed-integer)
- (resLength2 :signed-integer)
- (resLength3 :signed-integer)
- (unTokenLength :signed-integer)
- (defPartsLength :signed-integer)
- (whtSpListLength :signed-integer)
- (resLength7 :signed-integer)
- (resLength8 :signed-integer)
- )
-
- (def-mactype :numberpartsptr (find-mactype :pointer))
- (defrecord NumberParts
- (version :signed-integer)
- (data (:array :widechar 31)) ; index by [tokLeftQuote..tokMaxSymbols]
- (pePlus :widechararr)
- (peMinus :widechararr)
- (peMinusPlus :widechararr)
- (altNumTable :widechararr)
- (reserved (:array :character 20))
- )
-
- (defrecord FVector
- (start :signed-integer)
- (length :signed-integer)
- )
-
- (defrecord TripleInt (array (array :fvector 3))); index by [fPositive..fZero]
-
- (DEFRECORD SCRIPTRUNSTATUS (SCRIPT :SIGNED-BYTE) (VAR :SIGNED-BYTE))
-
- ; type for truncWhere parameter in new TruncString, TruncText
- (def-mactype :trunccode (find-mactype :signed-integer))
-
- ; type for styleRunPosition parameter in NPixel2Char etc.
- (def-mactype :juststylecode (find-mactype :signed-integer))
-
-
- (deftrap _fontscript nil
- (:stack :signed-integer)
- (:stack-trap #xA8B5 ((+ (ash 33280 16) 0) :signed-longint)))
-
- (deftrap _intlscript nil
- (:stack :signed-integer)
- (:stack-trap #xA8B5 ((+ (ash 33280 16) 2) :signed-longint)))
-
- (deftrap _keyscript ((code :signed-integer))
- nil
- (:stack-trap #xA8B5 code ((+ (ash 32770 16) 4) :signed-longint)))
-
- (deftrap _font2script ((fontnumber :signed-integer))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 fontnumber ((+ (ash 33282 16) 6) :signed-longint)))
-
- (deftrap _getenvirons ((verb :signed-integer))
- (:stack :signed-long)
- (:stack-trap #xA8B5 verb ((+ (ash 33794 16) 8) :signed-longint)))
-
- (deftrap _setenvirons ((verb :signed-integer) (param :signed-long))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 verb param ((+ (ash 33286 16) 10) :signed-longint)))
-
- (deftrap _getscript ((script :signed-integer) (verb :signed-integer))
- (:stack :signed-long)
- (:stack-trap #xA8B5 script verb ((+ (ash 33796 16) 12) :signed-longint)))
-
- (deftrap _setscript ((script :signed-integer) (verb :signed-integer) (param :signed-long))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 script verb param ((+ (ash 33288 16) 14) :signed-longint)))
-
- (deftrap _charbyte ((textbuf :pointer) (textoffset :signed-integer))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 textbuf textoffset ((+ (ash 33286 16) 16) :signed-longint)))
-
- (deftrap _chartype ((textbuf :pointer) (textoffset :signed-integer))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 textbuf textoffset ((+ (ash 33286 16) 18) :signed-longint)))
-
- (deftrap _pixel2char ((textbuf :pointer) (textlen :signed-integer) (slop :signed-integer) (pixelwidth :signed-integer) (leadingedge (:pointer :boolean)))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 textbuf textlen slop pixelwidth leadingedge ((+ (ash 33294 16) 20) :signed-longint)))
-
- (deftrap _char2pixel ((textbuf :pointer) (textlen :signed-integer) (slop :signed-integer) (offset :signed-integer) (direction :signed-integer))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 textbuf textlen slop offset direction ((+ (ash 33292 16) 22) :signed-longint)))
-
- (deftrap _transliterate ((srchandle :handle) (dsthandle :handle) (target :signed-integer) (srcmask :signed-long))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 srchandle dsthandle target srcmask ((+ (ash 33294 16) 24) :signed-longint)))
-
- (deftrap _findword ((textptr :pointer) (textlength :signed-integer) (offset :signed-integer) (leadingedge :boolean) (breaks (:pointer :breaktable)) (offsets (:pointer :offsettable)))
- nil
- (:stack-trap #xA8B5 textptr textlength offset leadingedge breaks offsets ((+ (ash 32786 16) 26) :signed-longint)))
-
- (deftrap _hilitetext ((textptr :pointer) (textlength :signed-integer) (firstoffset :signed-integer) (secondoffset :signed-integer) (offsets (:pointer :offsettable)))
- nil
- (:stack-trap #xA8B5 textptr textlength firstoffset secondoffset offsets ((+ (ash 32782 16) 28) :signed-longint)))
-
- (deftrap _drawjust ((textptr :pointer) (textlength :signed-integer) (slop :signed-integer))
- nil
- (:stack-trap #xA8B5 textptr textlength slop ((+ (ash 32776 16) 30) :signed-longint)))
-
- (deftrap _measurejust ((textptr :pointer) (textlength :signed-integer) (slop :signed-integer) (charlocs :pointer))
- nil
- (:stack-trap #xA8B5 textptr textlength slop charlocs ((+ (ash 32780 16) 32) :signed-longint)))
-
- (deftrap _parsetable ((table (:pointer :charbytetable)))
- (:stack :boolean)
- (:stack-trap #xA8B5 table ((+ (ash 33284 16) 34) :signed-longint)))
-
- (deftrap _getdeffontsize nil
- (:no-trap :signed-integer)
- (:no-trap (let ((fsize (%get-word (%int-to-ptr 2894))))
- (if (eql fsize 0) 12 fsize))))
-
- (deftrap _getsysfont nil
- (:no-trap :signed-integer)
- (:no-trap (%get-signed-word (%int-to-ptr 2982))))
-
- (deftrap _getappfont nil
- (:no-trap :signed-integer)
- (:no-trap (%get-signed-word (%int-to-ptr 2436))))
-
- (deftrap _getmbarheight nil
- (:no-trap :signed-integer)
- (:no-trap (%get-signed-word (%int-to-ptr 2986))))
-
- (deftrap _getsysjust nil
- (:no-trap :signed-integer)
- (:no-trap (%get-signed-word (%int-to-ptr 2988))))
-
- (deftrap _setsysjust ((newjust :signed-integer))
- nil
- (:no-trap (%put-word (%int-to-ptr 2988) newjust)))
-
- (deftrap _readlocation ((loc (:pointer :machinelocation)))
- nil
- (:register-trap #xA051 :a0 loc :d0 #x000c00E4))
-
- (deftrap _writelocation ((loc :machinelocation))
- nil
- (:register-trap #xA052 :a0 loc :d0 #x000c00E4))
-
- (deftrap _uprtext ((textptr :pointer) (len :signed-integer))
- nil
- (:register-trap #xA054 :a0 textptr :d0 len))
-
- (deftrap _lwrtext ((textptr :pointer) (len :signed-integer))
- nil
- (:register-trap #xA056 :a0 textptr :d0 len))
-
- ; New for 7.0
-
- (deftrap _lowertext ((textptr :pointer) (len :signed-integer))
- nil
- (:register-trap #xA056 :a0 textptr :d0 len))
-
- (deftrap _striptext ((textptr :pointer) (len :signed-integer))
- nil
- (:register-trap #xA256 :a0 textptr :d0 len))
-
- (deftrap _uppertext ((textptr :pointer) (len :signed-integer))
- nil
- (:register-trap #xA456 :a0 textptr :d0 len))
-
- (deftrap _stripuppertext ((textptr :pointer) (len :signed-integer))
- nil
- (:register-trap #xA656 :a0 textptr :d0 len))
-
-
- (deftrap _styledlinebreak ((textptr :pointer) (textlen :signed-long) (textstart :signed-long) (textend :signed-long) (flags :signed-long) (textwidth (:pointer :signed-long)) (textoffset (:pointer :signed-long)))
- (:stack :unsigned-byte)
- (:stack-trap #xA8B5 textptr textlen textstart textend flags textwidth textoffset ((+ (ash 33308 16) 65534) :signed-longint)))
-
- (deftrap _getformatorder ((ordering (:pointer :formatorder)) (firstformat :signed-integer) (lastformat :signed-integer) (lineright :boolean) (rldirproc :pointer) (dirparam :pointer))
- nil
- (:stack-trap #xA8B5 ordering firstformat lastformat lineright rldirproc dirparam ((+ (ash 32786 16) 65532) :signed-longint)))
-
- (deftrap _intltokenize ((tokenparam (:pointer :tokenblock)))
- (:stack :unsigned-byte)
- (:stack-trap #xA8B5 tokenparam ((+ (ash 33284 16) 65530) :signed-longint)))
-
- (deftrap _initdatecache ((thecache (:pointer :datecacherecord)))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 thecache ((+ (ash 33284 16) 65528) :signed-longint)))
-
- (deftrap _string2date ((textptr :pointer) (textlen :signed-long) (thecache (:pointer :datecacherecord)) (lengthused (:pointer :signed-long)) (datetime (:pointer :longdaterec)))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 textptr textlen thecache lengthused datetime ((+ (ash 33300 16) 65526) :signed-longint)))
-
- (deftrap _string2time ((textptr :pointer) (textlen :signed-long) (thecache (:pointer :datecacherecord)) (lengthused (:pointer :signed-long)) (datetime (:pointer :longdaterec)))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 textptr textlen thecache lengthused datetime ((+ (ash 33300 16) 65524) :signed-longint)))
-
- (deftrap _longdate2secs ((ldate :longdaterec) (lsecs (:pointer :longdatetime)))
- nil
- (:stack-trap #xA8B5 ldate lsecs ((+ (ash 32776 16) 65522) :signed-longint)))
-
- (deftrap _longsecs2date ((lsecs (:pointer :longdatetime)) (ldate (:pointer :longdaterec)))
- nil
- (:stack-trap #xA8B5 lsecs ldate ((+ (ash 32776 16) 65520) :signed-longint)))
-
- (deftrap _toggledate ((lsecs (:pointer :longdatetime)) (field :unsigned-word) (delta :signed-byte) (ch :signed-integer) (params :togglepb))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 lsecs field delta ch params ((+ (ash 33294 16) 65518) :signed-longint)))
-
- (deftrap _str2format ((instring (:string 255)) (partstable :numberparts) (outstring (:pointer :numformatstring)))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 instring partstable outstring ((+ (ash 33292 16) 65516) :signed-longint)))
-
- (deftrap _format2str ((mycanonical :numformatstring) (partstable :numberparts) (outstring (:pointer (:string 255))) (positions (:pointer :tripleint)))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 mycanonical partstable outstring positions ((+ (ash 33296 16) 65514) :signed-longint)))
-
- (deftrap _formatx2str ((x :pointer) (mycanonical :numformatstring) (partstable :numberparts) (outstring (:pointer (:string 255))))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 x mycanonical partstable outstring ((+ (ash 33296 16) 65512) :signed-longint)))
-
- (deftrap _formatstr2x ((source (:string 255)) (mycanonical :numformatstring) (partstable :numberparts) (x :pointer))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 source mycanonical partstable x ((+ (ash 33296 16) 65510) :signed-longint)))
-
- (deftrap _portiontext ((textptr :pointer) (textlen :signed-long))
- (:stack :signed-long)
- (:stack-trap #xA8B5 textptr textlen ((+ (ash 33800 16) 36) :signed-longint)))
-
- (deftrap _findscriptrun ((textptr :pointer) (textlen :signed-long) (lenused (:pointer :signed-long)))
- (:stack :scriptrunstatus)
- (:stack-trap #xA8B5 textptr textlen lenused ((+ (ash 33292 16) 38) :signed-longint)))
-
- (deftrap _visiblelength ((textptr :pointer) (textlen :signed-long))
- (:stack :signed-long)
- (:stack-trap #xA8B5 textptr textlen ((+ (ash 33800 16) 40) :signed-longint)))
-
- (deftrap _validdate ((vdate (:pointer :longdaterec)) (flags :signed-long) (newsecs (:pointer :longdatetime)))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 vdate flags newsecs ((+ (ash 33284 16) 65508) :signed-longint)))
-
- ; New for 7.0
-
- (deftrap _nfindword ((textptr :pointer) (textlength :signed-integer) (offset :signed-integer) (leadingedge :boolean) (nbreaks (:pointer :nbreaktable)) (offsets (:pointer :offsettable)))
- nil
- (:stack-trap #xA8B5 textptr textlength offset leadingedge nbreaks offsets ((+ (ash 32786 16) 65506) :signed-longint)))
-
- (deftrap _truncstring ((width :signed-integer) (thestring (:pointer (:string 255))) (truncwhere :signed-integer))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 width thestring truncwhere ((+ (ash 33288 16) 65504) :signed-longint)))
-
- (deftrap _trunctext ((width :signed-integer) (textptr :pointer) (length (:pointer :signed-integer)) (truncwhere :signed-integer))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 width textptr length truncwhere ((+ (ash 33292 16) 65502) :signed-longint)))
-
- (deftrap _replacetext ((basetext :handle) (substitutiontext :handle) (key (:string 15)))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 basetext substitutiontext key ((+ (ash 33292 16) 65500) :signed-longint)))
-
- (deftrap _npixel2char ((textbuf :pointer) (textlen :signed-long) (slop :signed-long) (pixelwidth :signed-long) (leadingedge (:pointer :boolean)) (widthremaining (:pointer :signed-long)) (stylerunposition :signed-integer) (numer :point) (denom :point))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 textbuf textlen slop pixelwidth leadingedge widthremaining stylerunposition numer denom ((+ (ash 33314 16) 46) :signed-longint)))
-
- (deftrap _nchar2pixel ((textbuf :pointer) (textlen :signed-long) (slop :signed-long) (offset :signed-long) (direction :signed-integer) (stylerunposition :signed-integer) (numer :point) (denom :point))
- (:stack :signed-integer)
- (:stack-trap #xA8B5 textbuf textlen slop offset direction stylerunposition numer denom ((+ (ash 33308 16) 48) :signed-longint)))
-
- (deftrap _ndrawjust ((textptr :pointer) (textlength :signed-long) (slop :signed-long) (stylerunposition :signed-integer) (numer :point) (denom :point))
- nil
- (:stack-trap #xA8B5 textptr textlength slop stylerunposition numer denom ((+ (ash 32790 16) 50) :signed-longint)))
-
- (deftrap _nmeasurejust ((textptr :pointer) (textlength :signed-long) (slop :signed-long) (charlocs :pointer) (stylerunposition :signed-integer) (numer :point) (denom :point))
- nil
- (:stack-trap #xA8B5 textptr textlength slop charlocs stylerunposition numer denom ((+ (ash 32794 16) 52) :signed-longint)))
-
- (deftrap _nportiontext ((textptr :pointer) (textlen :signed-long) (stylerunposition :signed-integer) (numer :point) (denom :point))
- (:stack :signed-long)
- (:stack-trap #xA8B5 textptr textlen stylerunposition numer denom ((+ (ash 33810 16) 54) :signed-longint)))
-
- ; $ENDC ; UsingScript
-
- ; $IFC NOT UsingIncludes
-
- ; $ENDC
-
-
- (export '($femptyformatstring $fextraseparator $fextrapercent $fbadpartstable
- $fformstrisnan $fformatoverflow $fextraexp $fmissingliteral
- $fextradecimal $fmissingdelimiter $fspuriouschars $foutofsynch
- $fbestguess $fformatok $fzero $fnegative $fpositive $smbreakoverflow
- $smbreakchar $smbreakword $res3field $res2field $res1field $pmfield
- $weekofyearfield $dayofyearfield $dayofweekfield $secondfield
- $minutefield $hourfield $dayfield $monthfield $yearfield $erafield
- $crash $badending $baddelim $stringoverflow $tokenoverflow $tokenok
- $smmiddlestylerun $smrightstylerun $smleftstylerun $smonlystylerun
- $smtruncerr $smtruncated $smnottruncated $smtruncmiddle $smtruncend
- $toggleerr5 $toggleerr4 $toggleerr3 $toggleoutofrange $togglebadnum
- $toggleunknown $togglebadchar $togglebaddelta $togglebadfield
- $toggleok $toggleundefined $datestdmask $pmmask $weekofyearmask
- $dayofyearmask $dayofweekmask $secondmask $minutemask $hourmask
- $daymask $monthmask $yearmask $eramask $maxdatefield $validdatefields
- $gencdevrangebit $togdelta12hourbit $togcharzcyclebit
- $togchar12hourbit $smalldatebit $fvnumber $curnumberpartsversion
- $tokmaxsymbols $tokeminus $tokeplus $tokdecpoint $tokescape
- $tokseparator $tokthousands $tokminussign $tokplussign $tokpercent
- $tokzerolead $toknonleader $tokleader $tokleadplacer $tokrightquote
- $tokleftquote $tokencarat $tokentilda $delimpad $tokennil
- $tokencenterdot $tokenellipsis $tokenperthousand
- $tokenrightsingguillemet $tokenleftsingguillemet $tokenintlcurrency
- $tokenfraction $tokennobreakspace $tokendollar $tokenhash $tokencolon
- $tokeninfinity $tokencappi $tokenmicro $tokenintegral $tokensigma
- $tokenroot $tokenpi $tokenquestion $tokenbar $tokenatsign
- $tokenampersand $tokenunderline $tokencaret $tokenpercent
- $tokensemicolon $token1quote $token2quote $tokenright1quote
- $tokenleft1quote $tokenright2quote $tokenleft2quote $tokenperiod
- $tokencomma $tokentilde $tokenexclam $tokenexclamequal
- $tokenlessgreat $tokennotequal $tokencolonequal $token2equal
- $tokengreatequal1 $tokengreatequal2 $tokenlessequal1 $tokenlessequal2
- $tokenequal $tokengreat $tokenless $tokenbackslash $tokenslash
- $tokenplusminus $tokendivide $tokenasterisk $tokenminus $tokenplus
- $tokenrightenclose $tokenleftenclose $tokenrightcurly $tokenleftcurly
- $tokenrightbracket $tokenleftbracket $tokenrightparen $tokenleftparen
- $tokenreserve2 $tokenreserve1 $tokenaltreal $tokenrealnum
- $tokenaltnum $tokenescape $tokenliteral $tokenrightcomment
- $tokenleftcomment $tokennewline $tokennumeric $tokenalpha
- $tokenrightlit $tokenleftlit $tokenwhite $tokenunknown $tokenempty
- $tokenintl $datetimeinvalid $datetimenotfound $cantreadutilities
- $tokenerr $sepnotconsistent $toomanyseps $extraneousstrings
- $fieldordernotintl $sepnotintlsep $leftoverchars $longdatefound
- $fataldatetime $hachek $ogonek $doubleacute $cedilla $ringmark
- $overdot $brevemark $macron $tilde $circumflex $dotlesslwri
- $graveupru $circumflexupru $acuteupru $graveupro $applelogo
- $circumflexupro $acuteupro $graveupri $diaeresisupri $circumflexupri
- $acuteupri $graveupre $diaeresisupre $acuteupra $circumflexupre
- $circumflexupra $perthousand $basedblquote $basesingquote
- $centereddot $dbldagger $flligature $filigature $rightsingguillemet
- $leftsingguillemet $intlcurrency $fraction $diaeresisupry
- $smuprhalfcharset $smfondend $smfondstart $romanflags $romanappfond
- $romansysfond $smfnametagenab $smfdualcaret $smfshowicon $smsfreverse
- $smsfligatures $smsfforms $smsfautoinit $smsfb0digits
- $smsfnoforcefont $smsfcontext $smsfnatcase $smsfsingbyte
- $smsfintellcp $smkeydisablekybdswitch $smkeyswapinputmethod
- $smkeynextinputmethod $smkeytoggledirection $smkeytoggleinline
- $smkeyenablekybds $smkeydisablekybds $smkeyswapkybd $smkeynextkybd
- $smkeyswapscript $smkeysysscript $smkeynextscript $smscriptaliasstyle
- $smscriptvalidstyles $smscripthelpfondsize $smscriptappfondsize
- $smscriptsysfondsize $smscriptsmallfondsize $smscriptpreffondsize
- $smscriptmonofondsize $smscriptname $smscriptfile $smscriptcreator
- $smscripttrap $smscriptprint $smscripticon $smscriptkeys
- $smscriptnumdate $smscriptlang $smscriptencoding $smscripttoken
- $smscriptflags $smscriptsort $smscriptdate $smscriptnumber
- $smscriptbundle $smscriptappfond $smscriptsysfond $smscriptredraw
- $smscriptjust $smscriptright $smscriptenabled $smscriptmunged
- $smscriptversion $smregioncode $smkchrcache $smdoublebyte
- $smcharportion $smoverride $smgenflags $smkeyswap $smkeycache
- $smsysref $smkeyscript $smlastscript $smsysscript $smprint $smdefault
- $smforced $smintlforce $smfontforce $smbidirect $smenabled $smmunged
- $smversion $smredrawline $smredrawword $smredrawchar $smbadscript
- $smbadverb $smnotinstalled $smmaskbopomofo2 $smmaskjamo2
- $smmaskhangul2 $smmaskgana2 $smmaskkana2 $smmaskkana1 $smmaskascii2
- $smmaskascii1 $smmasknative $smmaskascii $smmaskall $smtransupper
- $smtranslower $smtransbopomofo2 $smtransjamo2 $smtranshangul2
- $smtransgana2 $smtranskana2 $smtranskana1 $smtransascii2
- $smtransascii1 $smtranssystem $smtranscase $smtransnative
- $smtransascii $smhilite $smrightcaret $smleftcaret $smchar2byte
- $smchar1byte $smcharupper $smcharlower $smcharright $smcharleft
- $smcharvertical $smcharhorizontal $smjamobogmoeum $smjamomoeum
- $smjamobogjaeum $smjamojaeum $smfisclassuser $smfisclasslvl2
- $smfisclasslvl1 $smideographicuser $smideographiclevel2
- $smideographiclevel1 $smkanasoftok $smkanahardok $smkanasmall
- $smpunctgraphic $smpunctrepeat $smpunctblank $smpunctsymbol
- $smpunctnumber $smpunctnormal $smcharfisrussian $smcharfisgreek
- $smcharfisideo $smcharfisgana $smcharfiskana $smcharjamo
- $smcharhangul $smcharbidirect $smchartwobyterussian
- $smchartwobytegreek $smcharideographic $smcharhiragana
- $smcharkatakana $smcharextascii $smchareuro $smcharascii $smcharpunct
- $smcdoublemask $smcuppermask $smcrightmask $smcorientationmask
- $smcclassmask $smcreserved $smctypemask $smmiddlebyte $smlastbyte
- $smfirstbyte $smsinglebyte $intoutputmask $inteuropean $intjapanese
- $introman $intarabic $intwestern $calpersian $calcoptic $caljewish
- $caljapanese $calarabiclunar $calarabiccivil $calgregorian $smsindhi
- $smslavic $smamharic $smrussian $smchinese $smuninterp $smextarabic
- $smvietnamese $smeasteurroman $smethiopic $smgeez $smmongolian
- $smtibetan $smsimpchinese $smarmenian $smgeorgian $smlaotian $smthai
- $smkhmer $smburmese $smsinhalese $smmalayalam $smkannada $smtelugu
- $smtamil $smbengali $smoriya $smgujarati $smgurmukhi $smdevanagari
- $smrsymbol $smcyrillic $smgreek $smhebrew $smarabic $smkorean
- $smtradchinese $smjapanese $smroman $smcurrentscript $smsystemscript))
- (provide-interface 'script)
-